#include "Printer.h"

void Printer::insertLine(std::string line)
{
	printString << line;
}

void Printer::printToScreen()
{
	std::cout << printString.str();
}

void Printer::printToFile()
{
	std::ofstream resultsLogFile ("log.txt", std::ios::app );//appends to a file
	if (resultsLogFile.is_open())//opens the file
	{
		resultsLogFile << printString.str();
	}
	else//when file can't be opened
	{
		std::cout << "Unable to open file";
	}
}